/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.wlhy.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.msk.common.utils.DictUtils;
import com.msk.sys.domain.DataEntity;
import com.msk.sys.domain.Office;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * <p>[]</p>
 * <p>作者：zkp</p>
 * <p>邮箱：zkp@changxin.com</p>
 * <p>创建时间： 2018-06-06 </p>
 * <p>类说明：企业客户信息维护Entity </p>
 * <p>修改记录：</p>
 */
public class HtCompanyCustomer extends DataEntity<HtCompanyCustomer> {
	
	private static final long serialVersionUID = 1L;
	private String companyId;
    private String companyName;
	private String customerType;
    private String customerTypeName;
	private String customerName;
	private String contacts;
	private String contactNumber;
	private String contacts2;
	private String contactNumber2;
	private String attstr01;
	private String attstr02;
	private String attstr03;
	private String attstr04;
	private Date attdate01;
	private Date attdate02;
	
	@NotNull(message = "归属公司不能为空")
	private Office company;
	@NotNull(message = "归属部门不能为空")
	private Office office;
    
    private Date ioDate;
	
	
	public HtCompanyCustomer() {
		super();
	}

	public HtCompanyCustomer(String id){
		super(id);
	}

	@Length(min=0, max=64, message="企业id长度必须介于 0 和 64 之间")
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	
	@Length(min=0, max=10, message="客户类型长度必须介于 0 和 10 之间")
	public String getCustomerType() {
		return customerType;
	}

	public void setCustomerType(String customerType) {
		this.customerType = customerType;
	}
	
	@Length(min=0, max=50, message="客户名称长度必须介于 0 和 50 之间")
	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}
	
	@Length(min=0, max=50, message="联系人1长度必须介于 0 和 50 之间")
	public String getContacts() {
		return contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}
	
	@Length(min=0, max=20, message="联系人1电话长度必须介于 0 和 20 之间")
	public String getContactNumber() {
		return contactNumber;
	}

	public void setContactNumber(String contactNumber) {
		this.contactNumber = contactNumber;
	}
	
	@Length(min=0, max=50, message="联系人2长度必须介于 0 和 50 之间")
	public String getContacts2() {
		return contacts2;
	}

	public void setContacts2(String contacts2) {
		this.contacts2 = contacts2;
	}
	
	@Length(min=0, max=20, message="联系人2电话长度必须介于 0 和 20 之间")
	public String getContactNumber2() {
		return contactNumber2;
	}

	public void setContactNumber2(String contactNumber2) {
		this.contactNumber2 = contactNumber2;
	}
	
	@Length(min=0, max=200, message="attstr01长度必须介于 0 和 200 之间")
	public String getAttstr01() {
		return attstr01;
	}

	public void setAttstr01(String attstr01) {
		this.attstr01 = attstr01;
	}
	
	@Length(min=0, max=200, message="attstr02长度必须介于 0 和 200 之间")
	public String getAttstr02() {
		return attstr02;
	}

	public void setAttstr02(String attstr02) {
		this.attstr02 = attstr02;
	}
	
	@Length(min=0, max=200, message="attstr03长度必须介于 0 和 200 之间")
	public String getAttstr03() {
		return attstr03;
	}

	public void setAttstr03(String attstr03) {
		this.attstr03 = attstr03;
	}
	
	@Length(min=0, max=200, message="attstr04长度必须介于 0 和 200 之间")
	public String getAttstr04() {
		return attstr04;
	}

	public void setAttstr04(String attstr04) {
		this.attstr04 = attstr04;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttdate01() {
		return attdate01;
	}

	public void setAttdate01(Date attdate01) {
		this.attdate01 = attdate01;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttdate02() {
		return attdate02;
	}

	public void setAttdate02(Date attdate02) {
		this.attdate02 = attdate02;
	}
	
	
	
	public String getCustomerTypeName() {
		return DictUtils.getDictLabel(customerType, "customer_type", ""); 
	}

	
	public void setCustomerTypeName(String customerTypeName) {
		this.customerTypeName = customerTypeName;
	}

	
	public String getCompanyName() {
		return companyName;
	}

	
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
	public String getLogTitle() {
		return "企业客户信息维护";
	}
	
//	public String getLogType() {
//		return Log.LogType.module_operate.name();
//	}

	public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}

	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	public Date getIoDate() {
		return ioDate;
	}

	public void setIoDate(Date ioDate) {
		this.ioDate = ioDate;
	}
	
}